<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Duke's RSVP</title>
        <link href="./css/default.css" rel="stylesheet" type="text/css" />
    </h:head>
    <h:body>
        <h1>Welcome to Duke's RSVP!</h1>
        <h:dataTable value="#{statusBean.allCurrentEvents}" 
                     var="event"
                     summary="Table showing all events">
            <h:column>
                <f:facet name="header">
                    <h:outputText value="Event Name" />
                </f:facet>
                <h:outputText value="#{event.name}" />
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText value="Location" />
                </f:facet>
                <h:outputText value="#{event.location}" />
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText value="Status" />
                </f:facet>
                <a href="/rsvp/resources/status/#{event.id}">Event status</a>
            </h:column>
        </h:dataTable>
    </h:body>
</html>

